package net.easyjava.base.service.mongodb;

import net.easyjava.base.Exception.MongoException;
import net.easyjava.base.bean.mongodb.ArticleDataBean;

/**
 * Created by wenxiaoning on 15/12/20.
 */
public interface ArticleDataService {
    /**
     * 保存
     * @param articleDataBean
     * @return
     */
    public ArticleDataBean save(ArticleDataBean articleDataBean) throws MongoException;

    /**
     * 查找
     * @param articleId
     * @return
     */
    public ArticleDataBean find(String articleId) throws MongoException;

    /**
     * 修改
     * @param articleDataBean
     * @return
     */
    public ArticleDataBean update(ArticleDataBean articleDataBean) throws MongoException;

    /**
     * 通过文章id查找
     * @param articleId
     * @return
     * @throws MongoException
     */
    public ArticleDataBean findByArticleId(String articleId) throws MongoException;
}
